<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on命令</title>
</head>
<body>
    <div id="smartParty">
        <h2>{{a}}</h2>
        <button @click="add">点击加1</button>
        <button v-on:click="minus">点击减1</button>
    </div>
    <script src="js/vue2.js"></script>
    <script>
        var vue=new Vue({
            el:'#smartParty',
            data:{
                      a:100
            },
            methods:{
                add(event0){
                    this.a ++;
                    console.log("evento:"+event0)
                },
                minus(){
                    this.a--;
                }
            }
        })
    </script>
</body>
</html>